import React,{Component} from 'react';
import {
    Platform,
    StyleSheet,
    Text,
    Image,
    View,
    Alert,
    TouchableWithoutFeedback,
} from 'react-native';
import pxToDp from '../config/pxToDp';
import RadiusPic from './radiusPic'
export default class ChartListItem extends Component{

    render(){
        return(
            <TouchableWithoutFeedback
                onPress={this.props.chatScene}
            >
                <View style={styles.item}>
                    <View style={styles.imgItem}>
                        <View style={styles.msgNote}>
                            <Text style={styles.msgNoteText}>
                                90
                            </Text>
                        </View>
                        
                        <RadiusPic />
                        
                    </View>
                    <View style={styles.msgItem}>
                        <View style={styles.msgItemTitle}>
                            <Text style={styles.msgTitleName}>那网科技</Text>
                            <View style={styles.date}>
                                <Text >10月10日</Text>
                            </View>
                            
                        </View>
                        <View style={styles.msg}>
                            <Text>那网科技</Text>
                        </View>
                    </View>

                </View>
            </TouchableWithoutFeedback>
            
        )
    }


}

const styles = StyleSheet.create({
    item:{
        // flex: 1,
        width:pxToDp(640),
        height:60,
        flexDirection: 'row',
        marginBottom: 10,
        paddingLeft: 10,
        paddingRight: 10,
    },
    imgItem:{
        // width: pxToDp(100),
        width: pxToDp(110),
    },
    imgView:{
        flex: 1,
        // paddingLeft:10,        
        // paddingRight:10        
    },
    msgItem:{
        // marginLeft:20,
        // flex: 4,
        width: pxToDp(510),
        justifyContent: 'center',
        borderBottomWidth: 1,
        borderColor:"rgb(240,240,240)"
    },
    msgNote:{
        position: 'absolute',
        right:10,
        backgroundColor:'red',
        alignSelf: 'flex-end',
        justifyContent: 'center',
        width:22,
        height:22,
        zIndex:1,
        borderTopLeftRadius: 20,
        borderTopRightRadius: 20,
        borderBottomLeftRadius: 20,
        borderBottomRightRadius: 20,
    },
    msgNoteText:{
        color: "#fff",
        alignSelf: 'center',
    },
    msgItemTitle:{
        flexDirection: 'row',
        // width: pxToDp(475),
        // flex:2,
        
    }, 
    date: { 
        flex: 1,
        alignItems: 'flex-end',
    },
    msgTitleName: {
        flex:1,
        color: 'rgb(40,40,40)', 
        fontSize: 16, 
    },
    msg:{
        // flex: 2,
    },
})